import 'package:shop/common/shop_material.dart';

class Page3 extends StatefulWidget {
  Page3({Key key}) : super(key: key);
  @override
  _Page3State createState() => _Page3State();
}

class _Page3State extends State<Page3> {
  //这里写属性
  @override
  void initState() {
//初始化
    super.initState();
    _initGetData();
  }

  _initGetData() async {}

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[Text("购物车")],
          ),
          leading: Text(""),
          elevation: 0,
          actions: [
            Center(
              child: Row(
                children: <Widget>[
                  Text("编辑"),
                  Icon(Icons.edit),
                ],
              ),
            )
          ],
        ),
        body: ListView(
          children: <Widget>[
            Container(
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(5),
              ),
              margin: EdgeInsets.all(10),
              child: Column(
                children: <Widget>[
                  Row(
                    children: <Widget>[
                      Checkbox(value: true, onChanged: (v) {}),
                      Expanded(
                          child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: <Widget>[
                          Text("赶马商城"),
                          Icon(
                            Icons.save,
                            color: Colors.red,
                          )
                        ],
                      )),
                    ],
                  ),
                  Row(
                    children: <Widget>[
                      Checkbox(value: true, onChanged: (v) {}),
                      Expanded(
                          child: ListTile(
                        title: Text("data"),
                        subtitle: Text("data"),
                        leading: Container(
                          child: Text("图片"),
                        ),
                      )),
                    ],
                  ),
                ],
              ),
            )
          ],
        ));
  }

  @override
  void dispose() {
//销毁
    super.dispose();
  }
}
